<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/includes.jsp" %>
<html>
 <head>
    <title>工序管理</title>
    <!-- import css and js -->
	<%@ include file="/common/meta.jsp" %>
	<script src="${ctx}/js/ligerUI/js/plugins/ligerLayout.js" type="text/javascript"></script>
	<script src="${ctx}/js/jsp/comm.js" type="text/javascript"></script>
	<script type="text/javascript">
		var basic_Url="${ctx}/basic/process";
		var basic_WUrl="basic/process";
		var basic_Title="工序";
		var show_Width=380;
		var show_Hight=400;
		function createSearch(){
			init(1,8,'100,100,100,100,100,100,100,100','10%');
			//第一行的数据
			addCommon(0,0,"lable","名称：");
			addCommon(0,1,"txtlike","zd002Name");
			addCommon(0,2,"lable","编码：");
			addCommon(0,3,"txtlike","zd001Code");
			addCommon(0,4,"lable","车间：");
			addCommon(0,5,"txtlike","zd003WorkShop");
		}
		
		function searchAP(type){
			multipleSearch("#table1",true,"",basic_Url+"/list.do");
		}
		
		$(function(){
			$("#table1").ligerGrid({
		        columns: [
 						  { display: '名称', name: 'zd002Name', width: 180 },
 						  { display: '编码', name: 'zd001Code', width: 160 },
		                  { display: '车间', name: 'zd003WorkShop', width: 180,render: function (item)
 		                	 {
	                		 	if(item.basicWorkshopDO==null){
	                			 	return "";
	                		 	}else{
	                			 	return item.basicWorkshopDO.zd002Name;
	                		 	}
	                		 }},
		                  { display: '加工工种', name: 'zd004Processing', width: 150 }
		                      ],  usePager: true,pageSize:15,
		                      url : basic_Url+"/list.do",enabledSort:false,
		                      width: "100%", height:"100%",pageSizeOptions :[15,25,35], checkbox: true,      
		                      onDblClickRow : function (data, rowindex, rowobj){
		                    	  edit(data);
		                       }
		                  });
			$("#pageloading").hide();
		});
		
		document.onkeydown=keyListener;   
		function keyListener(e){   
		    e = e ? e : event;  
		    if(e.keyCode == 13){   
		    	searchAP();
		    }   
		}  	
		
	</script>
	
  </head>
 <body style="padding:10px" onload="createSearch()">  
       <div id="layout1">
          <div class="panelBar">
	            <ul class="toolBar">
		           <li><a class="add" onclick="add()">
		           <span>添加</span></a></li>
				   <li><a class="delete" onclick="del()"><span>删除</span></a></li>
               </ul>
          </div>
          <div id="pageHeader" class="pageHeader">
          <input type="hidden" id="type" name="type" value="${type}"/>
               <div class="searchBar" id="multipleSearchDialog">
	                <table class="table" width="100%" id="searchHeader" >  
                        <tbody id="newbody">
                        </tbody>
 	                </table>
                    <div class="subBar">
			             <ul>
				             <li><div class="buttonActive"><div class="buttonContent"><button type="submit" id="btnSearch" onclick="searchAP()">查询</button></div></div></li>
				             <li><a class="button" onclick="clearSearch()"><span>重置</span></a></li>
			             </ul>
	                </div>
               </div>
          </div>
      </div>
      <div id="table1">
      </div>
      <div class="clear"></div>
    </body>
</html>